package cn.kuporo.seckill.common.model.message;

import cn.kuporo.seckill.common.model.enums.PlaceOrderType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @author: kuporo
 * @since: 2025/7/10
 * @description: 事务消息
 */
@Data
@NoArgsConstructor
public class TxMessage extends ErrorMessage{
    /**
     * 活动id
     */
    private Long activityId;
    
    /**
     * 商品版本号
     */
    private Long version;
    /**
     * 商品名称
     */
    private String goodsName;
    /**
     * 秒杀活动价格
     */
    
    private BigDecimal activityPrice;
    public TxMessage(String destination, Long txNo, Long goodsId, Integer quantity, Long activityId, Long version, Long userId, String goodsName,
                     BigDecimal activityPrice, PlaceOrderType placeOrderType, Boolean exception, Integer bucketSerialNo, String orderTaskId) {

        super(destination, txNo, goodsId, quantity, placeOrderType, exception, bucketSerialNo, userId, orderTaskId);
        this.activityId = activityId;
        this.version = version;
        this.goodsName = goodsName;
        this.activityPrice = activityPrice;
    }

}
